package user;

import book.Book;
import book.BookList;
import ioperations.IOperation;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:张熳
 * Date:2025-09-04
 * Time:16:34
 */
public abstract class User {
    protected String name;
    //此时这个数组没有初始化,通过子类进行初始化
    protected IOperation[] iOperations;

    //此时这里为了子类当中帮我初始化父类的成员
    public User(String name) {
        this.name = name;
    }

    public abstract int menu();

    public void doIoperation(int choice, BookList bookList) {
        iOperations[choice].work(bookList);
    }
}
